<!--START JS-->
<i id="scriptTag">/static/js/console/publicNo.js</i>
<link rel="stylesheet" type="text/css" href="/static/js/plugins/uploadify/uploadify.css" />
<link rel="stylesheet" type="text/css" href="/static/css/plugins/awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css" >
<!--END JS-->

<div class="row wrapper border-bottom white-bg page-heading">
    <div class="col-lg-10">
        <h2><?php echo $page_title; ?></h2>
        <p>您可在此进行<?php echo $page_title; ?></p>
    </div>
    <div class="col-lg-2"></div>
</div>

<!--START publicNo-->
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-lg-12">
            <div class="ibox">
                <div class="ibox-title">
                    <h5><?php echo $page_title; ?></h5>
                </div>
                <div class="ibox-content">
                    <form role="form" action="/console/publicSave" method="post">
                        <div class="form-group" title="点击上传或修改二维码" style="min-height: 152px;">
                            <label>二维码：
                                <?php
                                if (form_error('qrcode')) {
                                    echo '<span class="text-danger">请上传图片！</span>';
                                }
                                ?>
                            </label>
                            <input type="file" id="file_upload" style="display: none;">
                            <input type="hidden" value="<?php echo $info['qrcode']; ?>" id="publicNo-qrcode" name="qrcode">
                            <div id="publicNo-qrcode-cover" style="position:absolute;top:87px;">
                                <?php if ($info['qrcode']) { ?>
                                    <img style="width: 129px;height:129px;" src="<?php echo $info['qrcode']; ?>"/>
                                <?php } ?>
                            </div>
                        </div>
                        <div class="form-group <?php if (form_error('name')) echo 'has-error'; ?>">
                            <label>名称：</label> 
                            <input type="text" placeholder="请输入公众号名称" class="form-control" value="<?php echo $info['name']; ?>" name="name" required>
                        </div>
                        <div class="form-group <?php if (form_error('number')) echo 'has-error'; ?>">
                            <label>微信号：</label> 
                            <input type="text" placeholder="请输入微信号" class="form-control" value="<?php echo $info['number']; ?>" name="number" required>
                        </div>
                        <div class="form-group">
                            <label>类型：</label> 
                            <?php if ($info['type']) { ?>
                                <div class="radio radio-success radio-inline">
                                    <input type="radio" name="type" value="1" <?php if ($info['type'] == 1) echo 'checked'; ?> id="inlineRadio1"> 
                                    <label for="inlineRadio1">订阅号</label>
                                </div>
                                <div class="radio radio-success radio-inline">
                                    <input type="radio" name="type" value="2" <?php if ($info['type'] == 2) echo 'checked'; ?> id="inlineRadio2"> 
                                    <label for="inlineRadio2">服务号</label>
                                </div>
                            <?php } else { ?>
                                <div class="radio radio-success radio-inline">
                                    <input type="radio" name="type" value="1" checked id="inlineRadio1"> 
                                    <label for="inlineRadio1">订阅号</label>
                                </div>
                                <div class="radio radio-success radio-inline">
                                    <input type="radio" name="type" value="2" id="inlineRadio2"> 
                                    <label for="inlineRadio2">服务号</label>
                                </div>
                            <?php } ?>
                        </div>
                        <div class="form-group <?php if (form_error('desc')) echo 'has-error'; ?>">
                            <label>介绍：</label> 
                            <input type="text" placeholder="请输入5-10位字符" class="form-control" value="<?php echo $info['desc']; ?>" name="desc" required minlength="5" maxlength="10">
                        </div>
                        <div class="form-group <?php if (form_error('phone')) echo 'has-error'; ?>">
                            <label>联系电话：</label> 
                            <input type="tel" placeholder="请输入8-11位电话号码" class="form-control" value="<?php echo $info['phone']; ?>" name="phone" required minlength="8" maxlength="11">
                        </div>
                        <div class="form-group <?php if (form_error('email')) echo 'has-error'; ?>">
                            <label>联系邮箱：</label> 
                            <input type="email" placeholder="请输入联系邮箱" class="form-control" value="<?php echo $info['email']; ?>" name="email" required>
                        </div>
                        <div class="form-group">
                            <button type="submit" class="btn btn-sm btn-primary">保存</button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<!--END publicNo-->